function WebAppController(){
	
	this.handler = function(){
			
		this.get = function(){
					
			var services = request.getAttr("services"), 
				userServicesGuids = [], userServices = [], page = [], list = [];
			if(services){
				
				services.forEach(function(row){
					if(row){
						userServicesGuids.push(row.value.guid);
						userServices.push(row.value);
					}
				});
				
				
				db.feedItems.get({where: {guids: {contains: userServicesGuids}}, orderby: {pubDate: "desc"}, count: 15}).forEach(function(row){
					var feedItem = row.value, service;
					
					$.each(feedItem.guids, function(i, guid){
						var serviceId = userServicesGuids.indexOf(guid);
						if(serviceId > -1){
							service = userServices[serviceId];
							return false;
						}
					});
					
					var section;
					for(var sec in page){
						if(page[sec] && (page[sec].service.guid === service.guid)){
							section = page[sec];
							break;
						}
					}
					
					if(section && feedItem.pubDate.isAfter(new Date(section.posts[0].pubDate).addMinutes(-60))){
						section.posts.push(feedItem);
					}else{
						page.unshift({service: service, posts: [feedItem]});
					}
					
					
				});
				
				var prettyDate = new PrettyDate.converter();
				page.reverse().forEach(function(section){
					list.push("<div class=section>");
					list.push("<a href='/ashafa/service/" + section.service.guid + "'><img src=/static/i/rss-feed-icon-20.png class=icon alt='' border=0 /></a>");
					list.push("<p class=header>");
					(section.service.owner)
						? list.push(section.service.owner + " " + section.service.verb + "ed ")
						: "";
					(section.posts.length == 1)
						? (section.service.owner)
							? list.push("a")
							: list.push("A")
						: list.push(section.posts.length);
					(section.posts.length == 1 && /^[aeiou]/.test(section.service.type))
						? list.push("n ")
						: list.push(" ");
					(section.posts.length > 1) 
						? list.push(Inflector.pluralize(section.service.type))
						: list.push(section.service.type);
					(!section.service.owner)
						? (section.posts.length > 1)
							? list.push(" were " + section.service.verb + "ed on ")
							: list.push(" was " + section.service.verb + "ed on ")
						: list.push(" on ");
					list.push("<a class=offsite href=" + section.service.link + ">" + section.service.name + "</a>");
					section.posts.forEach(function(post){
						list.push("<p class=post><a class=offsite href='" + post.link + "'>" + post.title + "</a>");
						list.push("<span class=sub-header>" + prettyDate.convert(post.pubDate.toString("yyyy-MM-ddTHH:mm:ssZ")) + "</span></p>")
						
					});
					list.push("</div>");
				});
				
				$("#content").append(list.join(""));
			}
			
		}
		
		this.post = function(){
			this.get();
		}
			
	}
	
}